ShowTable of Contents
Overview
The
global install handler supports the creation of desktop-related objects. This article demonstrates how shortcuts created by the install handler can be removed. By default, shortcuts installed by a feature are removed when the feature is removed, but deployers may desire control over the shortcuts created by other features. For example, a developer can create a new feature which removes the default shortcuts created by the Expeditor installation.
Global Install Handler Input
Since the use case intends to simply remove the default shortcuts created during Expeditor installation, begin by locating the properties file which provide the input to create the shortcuts originally. For example, the desktop shortcut's install handler input is located within the com.ibm.rcp.personality.default.branding.feature.jar/w32x86/desktop_xpd_win32.properties file.
link.context=CONTEXT_DESKTOP
link.scope=SCOPE_ALL_USERS
link.displayname=Expeditor 6.2.2
link.iconpath=$FEATURE_DIR/win32x86/xpd.ico
link.target=$RCP_DIR/rcplauncher.exe
#link.args=
link.workingdir=$RCP_DIR
link.windowstate=WINDOW_STATE_NORMAL
When the Default Personality Branding feature is provisioned during the Expeditor installation, the above install handler file is used to create a shortcut on the user's desktop.
Creating the Uninstaller
To remove shortcuts, create a new feature and simply provide the install handler input properties file (seen above) within a folder entitled
obsolete. By placing the same properties file within the obsolete folder, the install handler will perform removal of the shortcut without a need to remove the original feature.
Additionally, ensure the install handler is referenced within the feature.
Using the Uninstaller
Install the feature via an update site or edit the install.xml to deliver the feature during the Expeditor installation.